<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./lib/vue.js"></script>
    <script src="./lib/vue-router.js"></script>
    <style>
        .header {
            background: orange;
            height: 80px;
        }

        .container {
            display: flex;
            height: 600px;
        }

        .left {
            background-color: lightblue;
            flex: 2;
        }

        .right {
            background-color: lightcoral;
            flex: 8;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="header">
            <router-view></router-view>
        </div>

        <div class="container">
            <router-view name='left'></router-view>
            <router-view name='right'></router-view>
        </div>

    </div>
</body>
<script>
    var header = {
        template: '<div><h1>这是header</h1></div>'
    }

    var left = {
        template: '<div class="left"><h1>这是left</h1></div>'
    }

    var right = {
        template: '<div class="right"><h1>这是right</h1></div>'
    }

    var router = new VueRouter({
        routes: [
            {
                path: "/", components:
                {
                    default: header,
                    left: left,
                    right: right
                }

            }
        ]
    });

    var vm = new Vue({
        el: "#app",
        data: {},
        methods: {},
        router, router
    });
</script>

</html>